﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace QuanLyRapChieuPhim
{
    public partial class frmDayNow : Form
    {
        public frmDayNow()
        {
            InitializeComponent();
        }
        public static DateTime dtNow;
        public static string[] thu = { "Chủ nhật", "Thứ 2", "Thứ 3", "Thứ 4", "Thứ 5", "Thứ 6", "Thứ 7", };
        private void frmDayNow_Load(object sender, EventArgs e)
        {
            dtNow = DateTime.Now;
            timer1.Start();
        }
        private void timer1_Tick(object sender, EventArgs e)
        {
            dtNow = dtNow.AddSeconds(120).AddSeconds(1);
            label1.Text = thu[(int)dtNow.DayOfWeek] + ", " + dtNow.AddSeconds(1).ToString("G");
        }
        public static string getDatNow()
        {
            return thu[(int)dtNow.DayOfWeek] + ", " + dtNow.AddSeconds(1).ToString("G");
        }
    }
}
